import http from '@/qly/http'

export default {
    user:{
        userinfo: data => http.get('/api/user/userinfo', data),
    },
    swiper:{
        getSwiper: data => http.get('/api/swiper/index', data),
    },
    goodsCategory:{
        index: data => http.get('/api/goods_category/index', data),
    },
    address:{
        add: data => http.post('/api/address/add', data),
        edit: data => http.post('/api/address/edit', data),
        index: data => http.get('/api/address/index', data),
        info: data => http.get('/api/address/info', data),
        delete: data => http.post('/api/address/delete', data),
        // 经纬度转省市区
        regeo: data => http.get('/api/address/regeo', data),
        defaultChange: data => http.post('/api/address/defaultChange', data),
    },
    goods:{
        index: data => http.get('/api/goods/index', data),
        info: data => http.get('/api/goods/info', data),
    },
    information:{
        index: data => http.get('/api/information/index', data),
        info: data => http.get('/api/information/info', data),
        like: data => http.post('/api/information/like', data),
        read: data => http.post('/api/information/read', data),
        delete: data => http.post('/api/information/delete', data),
    },
    information_comment:{
        add: data => http.post('/api/information_comment/add', data),
        index: data => http.get('/api/information_comment/index', data),
    },
    pickup_point:{
        add: data => http.post('/api/pickup_point/add', data),
        edit: data => http.post('/api/pickup_point/edit', data),
        index: data => http.get('/api/pickup_point/index', data),
        info: data => http.get('/api/pickup_point/info', data),
        delete: data => http.post('/api/pickup_point/delete', data),
    },
}
